From: Richard M. Stallman Date: Thu, 12 Sep 2002 03:19:25 +0000 (+0000) Subject: (copy-abbrev-table): New function. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~23^2~48734 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ad9d51b2115f2bfdc4c7cd87c6c8c16cff0729b5;p=emacs.git (copy-abbrev-table): New function. --- diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 25bfcf70585..8e6b3ae69d8 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -74,6 +74,18 @@ buffer." (clear-abbrev-table (symbol-value (car tables))) (setq tables (cdr tables))))) +(defun copy-abbrev-table (table) + "Make a new abbrev-table with the same abbrevs as TABLE." + (let ((new-table (make-abbrev-table))) + (mapatoms + (lambda (symbol) + (define-abbrev new-table + (symbol-name symbol) + (symbol-value symbol) + (symbol-function symbol))) + table) + new-table)) + (defun insert-abbrevs () "Insert after point a description of all defined abbrevs. Mark is set after the inserted text."